home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / cischeat.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  55KB  |  1,458 lines

  1. /***************************************************************************
  2.  
  3.                         Cisco Heat & F1 GrandPrix Star
  4.                             (c) 1990 & 1991 Jaleco
  5.  
  6.  
  7.                     driver by Luca Elia (eliavit@unina.it)
  8.  
  9.  
  10. ----------------------------------------------------------------------
  11. Hardware        Main     Sub#1    Sub#2    Sound    Sound Chips
  12. ----------------------------------------------------------------------
  13. [Cisco Heat]    68000    68000    68000    68000    YM2151 2xM6295
  14.  
  15.     BOARD #1 CH-9072 EB90001-20024
  16.     BOARD #2 CH-9071 EB90001-20023
  17.     BOARD #3 CH-9073 EB90001-20025
  18.  
  19. [F1 GP Star]    68000    68000    68000    68000    YM2151 2xM6295
  20.  
  21.     TB - Top board     (audio & I/O)       GP-9190A EB90015-20039-1
  22.     MB - Middle board  (GFX)               GP-9189  EB90015-20038
  23.     LB - Lower board   (CPU/GFX)           GP-9188A EB90015-20037-1
  24.  
  25. ----------------------------------------------------------------------
  26.  
  27.  
  28. ----------------------------------------------------------------
  29. Main CPU                    [Cisco Heat]        [F1 GP Star]
  30. ----------------------------------------------------------------
  31. ROM                    R        000000-07ffff        <
  32.                             100000-17ffff        <
  33. Work RAM            RW        0f0000-0fffff        <
  34. Hardware Regs        RW        080000-087fff        <
  35. Units Linking RAM    RW        088000-88ffff        <
  36. Shared RAM #2        RW        090000-097fff        <
  37. Shared RAM #1        RW        098000-09ffff        <
  38. Scroll RAM 0        RW        0a0000-0a7fff        <
  39. Scroll RAM 1        RW        0a8000-0affff        <
  40. Scroll RAM 2        RW        0b0000-0b7fff        <
  41. Palette RAM            RW        0b8000-0bffff        <
  42.     Palette Scroll 0        0b9c00-0b9fff        0b9e00-0b9fff
  43.     Palette Scroll 1        0bac00-0bafff        0bae00-0bafff
  44.     Palette Road 0            0bb800-0bbfff        <
  45.     Palette Road 1            0bc800-0bcfff        <
  46.     Palette Sprites            0bd000-0bdfff        <
  47.     Palette Scroll 2        0bec00-0befff0        bee00-0befff
  48. ----------------------------------------------------------------
  49.  
  50.  
  51. ----------------------------------------------------------------
  52. Sub CPU's                    [Cisco Heat]        [F1 GP Star]
  53. ----------------------------------------------------------------
  54. ROM                    R        000000-03ffff        <
  55.                             200000-23ffff        -
  56. Work RAM            RW        0c0000-0c3fff        180000-183fff
  57. Shared RAM            RW        040000-047fff        080000-087fff
  58. Road RAM            RW        080000-0807ff        100000-1007ff
  59. Whatchdog                    100000-100001        200000-200001
  60. ----------------------------------------------------------------
  61.  
  62.  
  63. ----------------------------------------------------------------
  64. Sound CPU                    [Cisco Heat]        [F1 GP Star]
  65. ----------------------------------------------------------------
  66. ROM                    R        000000-03ffff        <
  67. Work RAM            RW        0f0000-0fffff        0e0000-0fffff
  68. M6295 #1 Banking     W        040002-040003        040004-040005
  69. M6295 #2 Banking     W        040004-040005        040008-040009
  70. Sound Latch             W        060002-060003        060000-060001
  71. Sound Latch            R        060004-060005        060000-060001
  72. YM2151 Reg Sel         W        080001-080001        <
  73. YM2151 Data             W        080003-080003        <
  74. YM2151 Status        R        080003-080003        <
  75. M6295 #1 Status        R        0a0001-0a0001        <
  76. M6295 #1 Data         W        0a0000-0a0003        <
  77. M6295 #2 Status        R        0c0001-0c0001        <
  78. M6295 #2 Data         W        0c0000-0c0003        <
  79. ----------------------------------------------------------------
  80.  
  81.  
  82. ---------------------------------------------------------------------------
  83.                                   Game code
  84.                                 [ Cisco Heat ]
  85. ---------------------------------------------------------------------------
  86.  
  87. f011a.w        *** stage - 1 ***
  88. f0190.l        *** score / 10 (BCD) ***
  89. f0280.w        *** time * 10 (seconds) ***
  90.  
  91. f61Xa.w        car X data
  92.  
  93. ---------------------------------------------------------------------------
  94.                                   Game code
  95.                             [ F1 GrandPrix Star ]
  96. ---------------------------------------------------------------------------
  97.  
  98. Note: This game has some leftover code from Cisco Heat, it seems.
  99.  
  100. f9088.w        *** lap - 1 ***
  101. fa008.w        ($fa000 + $08) *** time (seconds) ***
  102. fa2aa.l        ($fa200 + $aa) speed << 16
  103.  
  104.  
  105. ---------------------------------------------------------------------------
  106.                                Common Issues
  107. ---------------------------------------------------------------------------
  108.  
  109. - Some ROMs aren't used. I don't see big problems though.
  110.  
  111. - Screen control register (priorities, layers enabling etc.) - Where is it?
  112.  
  113. - In cischeat, at the start of some levels, you can see the empty scrolling
  114.   layers as they are filled. In f1gpstar, I'm unsure whether they are
  115.   correct in a few places: in the attract mode where the cars move
  116.   horizontally, for example, the wheels don't follow for this reason, I
  117.   think
  118.  
  119. - Sound communication not quite right: see Test Mode
  120.  
  121. ---------------------------------------------------------------------------
  122.                                    To Do
  123. ---------------------------------------------------------------------------
  124.  
  125. - Use the Sprite Manager (when SPRITE_TYPE_UNPACK and SPRITE_TYPE_ZOOM
  126.   will be usable together) for better looking rendering, better priority
  127.   support and shadow sprites
  128.  
  129. - Use the Tilemap Manager for the road layers (when this kind of layers
  130.   will be supported) for perfomance and better priority support.
  131.   A line based zooming should be possible, for f1gpstar..
  132.  
  133. - Force feedback :)
  134.  
  135. ***************************************************************************/
  136.  
  137. #include "driver.h"
  138. #include "drivers/megasys1.h"
  139.  
  140. /* Variables only used here: */
  141. static unsigned char *rom_1, *rom_2, *rom_3;
  142. static unsigned char *sharedram1, *sharedram2;
  143.  
  144. /* Variables that vidhrdw has access to: */
  145.  
  146. /* Variables defined in vidhrdw: */
  147. extern unsigned char *cischeat_roadram[2];
  148.  
  149. /* Functions defined in vidhrdw: */
  150. READ_HANDLER( cischeat_vregs_r );
  151. READ_HANDLER( f1gpstar_vregs_r );
  152.  
  153. WRITE_HANDLER( cischeat_vregs_w );
  154. WRITE_HANDLER( f1gpstar_vregs_w );
  155.  
  156. int cischeat_vh_start(void);
  157. int f1gpstar_vh_start(void);
  158.  
  159. void cischeat_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  160. void f1gpstar_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  161.  
  162.  
  163. /*
  164. **
  165. **                CPU # 1 (Main)
  166. **
  167. */
  168.  
  169. READ_HANDLER( sharedram1_r )            {return READ_WORD(&sharedram1[offset]);    }
  170. READ_HANDLER( sharedram2_r )            {return READ_WORD(&sharedram2[offset]);    }
  171.  
  172. WRITE_HANDLER( sharedram1_w ) {WRITE_WORD(&sharedram1[offset],data);    }
  173. WRITE_HANDLER( sharedram2_w ) {WRITE_WORD(&sharedram2[offset],data);    }
  174.  
  175. static READ_HANDLER( rom_1_r ) {return READ_WORD(&rom_1[offset]);}
  176. static READ_HANDLER( rom_2_r ) {return READ_WORD(&rom_2[offset]);}
  177. static READ_HANDLER( rom_3_r ) {return READ_WORD(&rom_3[offset]);}
  178.  
  179.  
  180. /**************************************************************************
  181.                                 [ Cisco Heat ]
  182. **************************************************************************/
  183.  
  184.  
  185. /*    CISCO HEAT
  186.     [  Test  ]        [  Real  ]
  187.     b9c00-b9fff        <                scroll 0
  188.     bac00-bafff        <                scroll 1
  189.     bb800-bbbff        bb800-bbfff        road 0
  190.     bc800-bcbff        bc800-bcfff        road 1
  191.     bd000-bd3ff        bd000-bdfff        sprites
  192.     bec00-befff        <                text        */
  193.  
  194. READ_HANDLER( cischeat_palette_r )
  195. {
  196.     return READ_WORD(&paletteram[offset]);
  197. }
  198.  
  199. WRITE_HANDLER( cischeat_palette_w )
  200. {
  201. int newword,r,g,b;
  202.  
  203.     COMBINE_WORD_MEM(&paletteram[offset],data);
  204.     newword = READ_WORD(&paletteram[offset]);
  205.     r = ((newword >> 8) & 0xF0 ) | ((newword << 0) & 0x08);
  206.     g = ((newword >> 4) & 0xF0 ) | ((newword << 1) & 0x08);
  207.     b = ((newword >> 0) & 0xF0 ) | ((newword << 2) & 0x08);
  208.  
  209.     // Scroll 0
  210.     if ( (offset >= 0x1c00) && (offset <= 0x1fff) ) { palette_change_color(0x000 + (offset - 0x1c00)/2, r,g,b ); return;}
  211.     // Scroll 1
  212.     if ( (offset >= 0x2c00) && (offset <= 0x2fff) ) { palette_change_color(0x200 + (offset - 0x2c00)/2, r,g,b ); return;}
  213.     // Scroll 2
  214.     if ( (offset >= 0x6c00) && (offset <= 0x6fff) ) { palette_change_color(0x400 + (offset - 0x6c00)/2, r,g,b ); return;}
  215.     // Road 0
  216.     if ( (offset >= 0x3800) && (offset <= 0x3fff) ) { palette_change_color(0x600 + (offset - 0x3800)/2, r,g,b ); return;}
  217.     // Road 1
  218.     if ( (offset >= 0x4800) && (offset <= 0x4fff) ) { palette_change_color(0xa00 + (offset - 0x4800)/2, r,g,b ); return;}
  219.     // Sprites
  220.     if ( (offset >= 0x5000) && (offset <= 0x5fff) ) { palette_change_color(0xe00 + (offset - 0x5000)/2, r,g,b ); return;}
  221. }
  222.  
  223.  
  224.  
  225. static struct MemoryReadAddress cischeat_readmem[] =
  226. {
  227.     { 0x000000, 0x07ffff, MRA_ROM            },    // ROM
  228.     { 0x100000, 0x17ffff, rom_1_r            },    // ROM
  229.     { 0x0f0000, 0x0fffff, MRA_BANK1            },    // RAM
  230.     { 0x080000, 0x087fff, cischeat_vregs_r    },    // Vregs
  231.     { 0x088000, 0x088fff, MRA_BANK2            },    // Linking with other units
  232.  
  233. /*     Only the first 0x800 bytes are tested but:
  234.     CPU #0 PC 0000278c: warning - write 68c0 to unmapped memory address 0009c7fe
  235.     CPU #0 PC 0000dd58: warning - read unmapped memory address 000945ac
  236.     No mem access error from the other CPU's, though.. */
  237.  
  238.     /* this is the right order of sharedram's */
  239.     { 0x090000, 0x097fff, sharedram2_r        },    // Sharedram with sub CPU#2
  240.     { 0x098000, 0x09ffff, sharedram1_r        },    // Sharedram with sub CPU#1
  241.  
  242.     { 0x0a0000, 0x0a7fff, megasys1_scrollram_0_r    },    // Scroll ram 0
  243.     { 0x0a8000, 0x0affff, megasys1_scrollram_1_r    },    // Scroll ram 1
  244.     { 0x0b0000, 0x0b7fff, megasys1_scrollram_2_r    },    // Scroll ram 2
  245.  
  246.     { 0x0b8000, 0x0bffff, cischeat_palette_r    },    // Palettes
  247.  
  248.     { -1 }
  249. };
  250.  
  251. static struct MemoryWriteAddress cischeat_writemem[] =
  252. {
  253.     { 0x000000, 0x07ffff, MWA_ROM                            },    // ROM
  254.     { 0x100000, 0x17ffff, MWA_ROM                            },    // ROM
  255.     { 0x0f0000, 0x0fffff, MWA_BANK1, &megasys1_ram            },    // RAM
  256.     { 0x080000, 0x087fff, cischeat_vregs_w, &megasys1_vregs    },    // Vregs
  257.     { 0x088000, 0x088fff, MWA_BANK2                            },    // Linking with other units
  258.  
  259.     { 0x090000, 0x097fff, sharedram2_w, &sharedram2            },    // Sharedram with sub CPU#2
  260.     { 0x098000, 0x09ffff, sharedram1_w, &sharedram1            },    // Sharedram with sub CPU#1
  261.  
  262.     /* Only writes to the first 0x40000 bytes affect the tilemaps:             */
  263.     /* either these games support larger tilemaps or have more ram than needed */
  264.     { 0x0a0000, 0x0a7fff, megasys1_scrollram_0_w, &megasys1_scrollram_0    },    // Scroll ram 0
  265.     { 0x0a8000, 0x0affff, megasys1_scrollram_1_w, &megasys1_scrollram_1    },    // Scroll ram 1
  266.     { 0x0b0000, 0x0b7fff, megasys1_scrollram_2_w, &megasys1_scrollram_2    },    // Scroll ram 2
  267.  
  268.     { 0x0b8000, 0x0bffff, cischeat_palette_w, &paletteram    },    // Palettes
  269.  
  270.     { -1 }
  271. };
  272.  
  273.  
  274.  
  275.  
  276.  
  277. /**************************************************************************
  278.                             [ F1 GrandPrix Star ]
  279. **************************************************************************/
  280.  
  281.  
  282. READ_HANDLER( f1gpstar_palette_r )
  283. {
  284.     return READ_WORD(&paletteram[offset]);
  285. }
  286. WRITE_HANDLER( f1gpstar_palette_w )
  287. {
  288. int newword,r,g,b;
  289.  
  290.     COMBINE_WORD_MEM(&paletteram[offset],data);
  291.     newword = READ_WORD(&paletteram[offset]);
  292.     r = ((newword >> 8) & 0xF0 ) | ((newword << 0) & 0x08);
  293.     g = ((newword >> 4) & 0xF0 ) | ((newword << 1) & 0x08);
  294.     b = ((newword >> 0) & 0xF0 ) | ((newword << 2) & 0x08);
  295.  
  296.     // Scroll 0
  297.     if ( (offset >= 0x1e00) && (offset <= 0x1fff) ) { palette_change_color(0x000 + (offset - 0x1e00)/2, r,g,b ); return;}
  298.     // Scroll 1
  299.     if ( (offset >= 0x2e00) && (offset <= 0x2fff) ) { palette_change_color(0x100 + (offset - 0x2e00)/2, r,g,b ); return;}
  300.     // Scroll 2
  301.     if ( (offset >= 0x6e00) && (offset <= 0x6fff) ) { palette_change_color(0x200 + (offset - 0x6e00)/2, r,g,b ); return;}
  302.     // Road 0
  303.     if ( (offset >= 0x3800) && (offset <= 0x3fff) ) { palette_change_color(0x300 + (offset - 0x3800)/2, r,g,b ); return;}
  304.     // Road 1
  305.     if ( (offset >= 0x4800) && (offset <= 0x4fff) ) { palette_change_color(0x700 + (offset - 0x4800)/2, r,g,b ); return;}
  306.     // Sprites
  307.     if ( (offset >= 0x5000) && (offset <= 0x5fff) ) { palette_change_color(0xb00 + (offset - 0x5000)/2, r,g,b ); return;}
  308. }
  309.  
  310. /*    F1 GP Star tests:
  311.     0A0000-0B8000
  312.     0F0000-100000
  313.     0B8000-0C0000
  314.     090800-091000
  315.     098800-099000
  316.     0F8000-0F9000    */
  317.  
  318. static struct MemoryReadAddress f1gpstar_readmem[] =
  319. {
  320.     { 0x000000, 0x07ffff, MRA_ROM            },    // ROM
  321.     { 0x100000, 0x17ffff, rom_1_r            },    // ROM
  322.     { 0x0f0000, 0x0fffff, MRA_BANK1            },    // RAM
  323.     { 0x080000, 0x087fff, f1gpstar_vregs_r    },    // Vregs
  324.     { 0x088000, 0x088fff, MRA_BANK2            },    // Linking with other units
  325.  
  326.     { 0x090000, 0x097fff, sharedram2_r        },    // Sharedram with sub CPU#2
  327.     { 0x098000, 0x09ffff, sharedram1_r        },    // Sharedram with sub CPU#1
  328.  
  329.     { 0x0a0000, 0x0a7fff, megasys1_scrollram_0_r    },    // Scroll ram 0
  330.     { 0x0a8000, 0x0affff, megasys1_scrollram_1_r    },    // Scroll ram 1
  331.     { 0x0b0000, 0x0b7fff, megasys1_scrollram_2_r    },    // Scroll ram 2
  332.  
  333.     { 0x0b8000, 0x0bffff, f1gpstar_palette_r    },    // Palettes
  334.     { -1 }
  335. };
  336.  
  337. static struct MemoryWriteAddress f1gpstar_writemem[] =
  338. {
  339.     { 0x000000, 0x07ffff, MWA_ROM                            },
  340.     { 0x100000, 0x17ffff, MWA_ROM                            },
  341.     { 0x0f0000, 0x0fffff, MWA_BANK1, &megasys1_ram            },    // RAM
  342.     { 0x080000, 0x087fff, f1gpstar_vregs_w, &megasys1_vregs    },    // Vregs
  343.     { 0x088000, 0x088fff, MWA_BANK2                            },    // Linking with other units
  344.  
  345.     { 0x090000, 0x097fff, sharedram2_w, &sharedram2            },    // Sharedram with sub CPU#2
  346.     { 0x098000, 0x09ffff, sharedram1_w, &sharedram1            },    // Sharedram with sub CPU#1
  347.  
  348.     /* Only writes to the first 0x40000 bytes affect the tilemaps:             */
  349.     /* either these games support larger tilemaps or have more ram than needed */
  350.     { 0x0a0000, 0x0a7fff, megasys1_scrollram_0_w, &megasys1_scrollram_0    },    // Scroll ram 0
  351.     { 0x0a8000, 0x0affff, megasys1_scrollram_1_w, &megasys1_scrollram_1    },    // Scroll ram 1
  352.     { 0x0b0000, 0x0b7fff, megasys1_scrollram_2_w, &megasys1_scrollram_2    },    // Scroll ram 2
  353.  
  354.     { 0x0b8000, 0x0bffff, f1gpstar_palette_w, &paletteram    },    // Palettes
  355.  
  356.     { -1 }
  357. };
  358.  
  359.  
  360.  
  361.  
  362.  
  363. /*
  364. **
  365. **                CPU # 2 (Road)
  366. **
  367. */
  368.  
  369. /**************************************************************************
  370.                                 [ Cisco Heat ]
  371. **************************************************************************/
  372.  
  373. static struct MemoryReadAddress cischeat_readmem2[] =
  374. {
  375.     { 0x000000, 0x03ffff, MRA_ROM        },    // ROM
  376.     { 0x200000, 0x23ffff, rom_2_r        },    // ROM
  377.     { 0x0c0000, 0x0c3fff, MRA_BANK3        },    // RAM
  378.     { 0x040000, 0x047fff, sharedram1_r    },    // Shared RAM (with Main CPU)
  379.     { 0x080000, 0x0807ff, MRA_BANK4        },    // Road RAM
  380.     { -1 }
  381. };
  382. static struct MemoryWriteAddress cischeat_writemem2[] =
  383. {
  384.     { 0x000000, 0x03ffff, MWA_ROM                            },    // ROM
  385.     { 0x200000, 0x23ffff, MWA_ROM                            },    // ROM
  386.     { 0x0c0000, 0x0c3fff, MWA_BANK3                            },    // RAM
  387.     { 0x040000, 0x047fff, sharedram1_w                        },    // Shared RAM (with Main CPU)
  388.     { 0x080000, 0x0807ff, MWA_BANK4, &cischeat_roadram[0]    },    // Road RAM
  389.     { 0x100000, 0x100001, MWA_NOP                            },    // watchdog
  390.     { -1 }
  391. };
  392.  
  393.  
  394.  
  395.  
  396. /**************************************************************************
  397.                             [ F1 GrandPrix Star ]
  398. **************************************************************************/
  399.  
  400. static struct MemoryReadAddress f1gpstar_readmem2[] =
  401. {
  402.     { 0x000000, 0x03ffff, MRA_ROM        },    // ROM
  403.     { 0x180000, 0x183fff, MRA_BANK3        },    // RAM
  404.     { 0x080000, 0x0807ff, sharedram1_r    },    // Shared RAM (with Main CPU)
  405.     { 0x100000, 0x1007ff, MRA_BANK4        },    // Road RAM
  406.     { -1 }
  407. };
  408. static struct MemoryWriteAddress f1gpstar_writemem2[] =
  409. {
  410.     { 0x000000, 0x03ffff, MWA_ROM                            },    // ROM
  411.     { 0x180000, 0x183fff, MWA_BANK3                            },    // RAM
  412.     { 0x080000, 0x0807ff, sharedram1_w                        },    // Shared RAM (with Main CPU)
  413.     { 0x100000, 0x1007ff, MWA_BANK4, &cischeat_roadram[0]    },    // Road RAM
  414.     { 0x200000, 0x200001, MWA_NOP                            },    // watchdog
  415.     { -1 }
  416. };
  417.  
  418.  
  419. /*
  420. **
  421. **                CPU # 3 (Road)
  422. **
  423. */
  424.  
  425. /**************************************************************************
  426.                                 [ Cisco Heat ]
  427. **************************************************************************/
  428.  
  429. static struct MemoryReadAddress cischeat_readmem3[] =
  430. {
  431.     { 0x000000, 0x03ffff, MRA_ROM        },    // ROM
  432.     { 0x200000, 0x23ffff, rom_3_r        },    // ROM
  433.     { 0x0c0000, 0x0c3fff, MRA_BANK5        },    // RAM
  434.     { 0x040000, 0x047fff, sharedram2_r    },    // Shared RAM (with Main CPU)
  435.     { 0x080000, 0x0807ff, MRA_BANK6        },    // Road RAM
  436.     { -1 }
  437. };
  438. static struct MemoryWriteAddress cischeat_writemem3[] =
  439. {
  440.     { 0x000000, 0x03ffff, MWA_ROM                            },    // ROM
  441.     { 0x200000, 0x23ffff, MWA_ROM                            },    // ROM
  442.     { 0x0c0000, 0x0c3fff, MWA_BANK5                            },    // RAM
  443.     { 0x040000, 0x047fff, sharedram2_w                        },    // Shared RAM (with Main CPU)
  444.     { 0x080000, 0x0807ff, MWA_BANK6, &cischeat_roadram[1]    },    // Road RAM
  445.     { 0x100000, 0x100001, MWA_NOP                            },    // watchdog
  446.     { -1 }
  447. };
  448.  
  449.  
  450.  
  451.  
  452.  
  453. /**************************************************************************
  454.                             [ F1 GrandPrix Star ]
  455. **************************************************************************/
  456.  
  457. static struct MemoryReadAddress f1gpstar_readmem3[] =
  458. {
  459.     { 0x000000, 0x03ffff, MRA_ROM        },    // ROM
  460.     { 0x180000, 0x183fff, MRA_BANK5        },    // RAM
  461.     { 0x080000, 0x0807ff, sharedram2_r    },    // Shared RAM (with Main CPU)
  462.     { 0x100000, 0x1007ff, MRA_BANK6        },    // Road RAM
  463.     { -1 }
  464. };
  465. static struct MemoryWriteAddress f1gpstar_writemem3[] =
  466. {
  467.     { 0x000000, 0x03ffff, MWA_ROM                            },    // ROM
  468.     { 0x180000, 0x183fff, MWA_BANK5                            },    // RAM
  469.     { 0x080000, 0x0807ff, sharedram2_w                        },    // Shared RAM (with Main CPU)
  470.     { 0x100000, 0x1007ff, MWA_BANK6, &cischeat_roadram[1]    },    // Road RAM
  471.     { 0x200000, 0x200001, MWA_NOP                            },    // watchdog
  472.     { -1 }
  473. };
  474.  
  475.  
  476.  
  477. /*
  478. **
  479. **                CPU # 4 (Sound)
  480. **
  481. */
  482.  
  483. /* Both Games: music tempo driven by the YM2151 timers (status reg polled) */
  484.  
  485.  
  486. /**************************************************************************
  487.                                 [ Cisco Heat ]
  488. **************************************************************************/
  489.  
  490. #define SOUNDBANK_W(_n_) \
  491. WRITE_HANDLER( cischeat_soundbank_##_n_##_w ) \
  492. { \
  493.     OKIM6295_set_bank_base(_n_, ALL_VOICES, 0x40000 * (data & 1) ); \
  494. }
  495.  
  496. SOUNDBANK_W(0)
  497. SOUNDBANK_W(1)
  498.  
  499. static struct MemoryReadAddress cischeat_sound_readmem[] =
  500. {
  501.     { 0x000000, 0x03ffff, MRA_ROM                    },    // ROM
  502.     { 0x0f0000, 0x0fffff, MRA_BANK7                    },    // RAM
  503.     { 0x060004, 0x060005, soundlatch_r                },    // From Main CPU
  504.     { 0x080002, 0x080003, YM2151_status_port_0_r    },
  505.     { 0x0a0000, 0x0a0001, OKIM6295_status_0_r        },
  506.     { 0x0c0000, 0x0c0001, OKIM6295_status_1_r        },
  507.     { -1 }
  508. };
  509. static struct MemoryWriteAddress cischeat_sound_writemem[] =
  510. {
  511.     { 0x000000, 0x03ffff, MWA_ROM                        },    // ROM
  512.     { 0x0f0000, 0x0fffff, MWA_BANK7                        },    // RAM
  513.     { 0x040002, 0x040003, cischeat_soundbank_0_w        },    // Sample Banking
  514.     { 0x040004, 0x040005, cischeat_soundbank_1_w        },    // Sample Banking
  515.     { 0x060002, 0x060003, ms_soundlatch2_w                },    // To Main CPU
  516.     { 0x080000, 0x080001, ms_YM2151_register_port_0_w    },
  517.     { 0x080002, 0x080003, ms_YM2151_data_port_0_w        },
  518.     { 0x0a0000, 0x0a0003, ms_OKIM6295_data_0_w            },
  519.     { 0x0c0000, 0x0c0003, ms_OKIM6295_data_1_w            },
  520.     { -1 }
  521. };
  522.  
  523.  
  524.  
  525.  
  526.  
  527. /**************************************************************************
  528.                             [ F1 GrandPrix Star ]
  529. **************************************************************************/
  530.  
  531. static struct MemoryReadAddress f1gpstar_sound_readmem[] =
  532. {
  533.     { 0x000000, 0x03ffff, MRA_ROM                    },    // ROM
  534.     { 0x0e0000, 0x0fffff, MRA_BANK7                    },    // RAM                (cischeat: f0000-fffff)
  535.     { 0x060000, 0x060001, soundlatch_r                },    // From Main CPU    (cischeat: 60004)
  536.     { 0x080002, 0x080003, YM2151_status_port_0_r    },
  537.     { 0x0a0000, 0x0a0001, OKIM6295_status_0_r        },
  538.     { 0x0c0000, 0x0c0001, OKIM6295_status_1_r        },
  539.     { -1 }
  540. };
  541. static struct MemoryWriteAddress f1gpstar_sound_writemem[] =
  542. {
  543.     { 0x000000, 0x03ffff, MWA_ROM                        },    // ROM
  544.     { 0x0e0000, 0x0fffff, MWA_BANK7                        },    // RAM                (cischeat: f0000-fffff)
  545.     { 0x040004, 0x040005, cischeat_soundbank_0_w        },    // Sample Banking    (cischeat: 40002)
  546.     { 0x040008, 0x040009, cischeat_soundbank_1_w        },    // Sample Banking    (cischeat: 40004)
  547.     { 0x060000, 0x060001, ms_soundlatch2_w                },    // To Main CPU        (cischeat: 60002)
  548.     { 0x080000, 0x080001, ms_YM2151_register_port_0_w    },
  549.     { 0x080002, 0x080003, ms_YM2151_data_port_0_w        },
  550.     { 0x0a0000, 0x0a0003, ms_OKIM6295_data_0_w            },
  551.     { 0x0c0000, 0x0c0003, ms_OKIM6295_data_1_w            },
  552.     { -1 }
  553. };
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560. /***************************************************************************
  561.  
  562.                                 Input Ports
  563.  
  564. ***************************************************************************/
  565.  
  566. #define DRIVING_WHEEL \
  567.     PORT_ANALOG( 0xff, 0x80, IPT_AD_STICK_X | IPF_CENTER, 30, 30, 0, 0xff)
  568.  
  569. /* Fake input port to read the status of five buttons: used to
  570.    implement the shift using 2 buttons, and the accelerator in
  571.    f1gpstar */
  572.  
  573. #define BUTTONS_STATUS \
  574.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) \
  575.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) \
  576.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) \
  577.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) \
  578.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 )
  579.  
  580. /**************************************************************************
  581.                                 [ Cisco Heat ]
  582. **************************************************************************/
  583.  
  584.  
  585. //    Input Ports:    [0] Fake: Buttons Status
  586. //                    [1] Coins        [2] Controls    [3] Unknown
  587. //                    [4]    DSW 1 & 2    [5] DSW 3        [6] Driving Wheel
  588.  
  589. INPUT_PORTS_START( cischeat )
  590.  
  591.     PORT_START    // IN0 - Fake input port - Buttons status
  592.     BUTTONS_STATUS
  593.  
  594.  
  595.     PORT_START    // IN1 - Coins - $80000.w
  596.     PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_COIN1   )
  597.     PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_COIN2   )
  598.     PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_COIN3   )    // operator's facility
  599.     PORT_BITX( 0x08, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )     // called "Test"
  600.     PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_START1  )
  601.     PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_START2  )
  602.     PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  603.     PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  604.  
  605.  
  606.     PORT_START    // IN2 - Controls - $80002.w
  607.     PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_BUTTON2 )    // Brake
  608. //    PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_BUTTON4 )    // Shift - We handle it using buttons 3&4
  609.     PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  610.     PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  611.     PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )    // Accel
  612.     PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  613.     PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  614.     PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_BUTTON5 )    // Horn
  615.  
  616.  
  617.     PORT_START    // IN3 - Motor Control? - $80004.w
  618.     PORT_DIPNAME( 0x01, 0x01, "Up Limit SW"      )    // Limit the Cockpit movements?
  619.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  620.     PORT_DIPSETTING(    0x00, DEF_STR( On )  )
  621.     PORT_DIPNAME( 0x02, 0x02, "Down Limit SW"    )
  622.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  623.     PORT_DIPSETTING(    0x00, DEF_STR( On )  )
  624.     PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  625.     PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  626.     PORT_DIPNAME( 0x10, 0x10, "Right Limit SW"    )
  627.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  628.     PORT_DIPSETTING(    0x00, DEF_STR( On )  )
  629.     PORT_DIPNAME( 0x20, 0x20, "Left Limit SW"    )
  630.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  631.     PORT_DIPSETTING(    0x00, DEF_STR( On )  )
  632.     PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  633.     PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  634.  
  635.  
  636.     PORT_START    // IN4 - DSW 1 & 2 - $80006.w -> !f000a.w(hi byte) !f0008.w(low byte)
  637.     COINAGE_6BITS_2
  638.     PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )    // unused?
  639.     PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  640.     PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  641.     PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )    // unused?
  642.     PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
  643.     PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  644.     // DSW 2
  645.     PORT_DIPNAME( 0x0300, 0x0300, "Unit ID"            )        // -> !f0020 (ID of this unit, when linked)
  646.     PORT_DIPSETTING(      0x0300, "0 (Red Car)"    )
  647.     PORT_DIPSETTING(      0x0200, "1 (Blue Car)"   )
  648.     PORT_DIPSETTING(      0x0100, "2 (Yellow Car)" )
  649.     PORT_DIPSETTING(      0x0000, "3 (Green Car)"  )
  650.     PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) )    // -> !f0026
  651.     PORT_DIPSETTING(      0x0000, "Easy"    )
  652.     PORT_DIPSETTING(      0x0c00, "Normal"  )
  653.     PORT_DIPSETTING(      0x0800, "Hard"    )
  654.     PORT_DIPSETTING(      0x0400, "Hardest" )
  655.     PORT_BITX(    0x1000, 0x1000, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Infinite Time", IP_KEY_NONE, IP_JOY_NONE ) // -> !f0028
  656.     PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
  657.     PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  658.     PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds ) )
  659.     PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
  660.     PORT_DIPSETTING(      0x2000, DEF_STR( On )  )
  661.     PORT_DIPNAME( 0x4000, 0x4000, "Country" )
  662.     PORT_DIPSETTING(      0x4000, "Japan" )
  663.     PORT_DIPSETTING(      0x0000, "USA"   )
  664.     PORT_DIPNAME( 0x8000, 0x8000, "Allow Continue" )        // -> !f00c0
  665.     PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  666.     PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  667.  
  668.  
  669.     PORT_START    // IN5 - DSW 3 (4 bits, Cabinet Linking) - $82200.w
  670.     PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
  671.     PORT_DIPNAME( 0x06, 0x06, "Unit ID (2)" )    // -> f0020 (like DSW2 !!)
  672.     PORT_DIPSETTING(    0x06, "Use other"      )
  673.     PORT_DIPSETTING(    0x00, "0 (Red Car)"    )
  674.     PORT_DIPSETTING(    0x02, "1 (Blue Car)"   )
  675.     PORT_DIPSETTING(    0x04, "2 (Yellow Car)" )
  676.     PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  677.     PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  678.     PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  679.     PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  680.     PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  681.  
  682.     PORT_START    // IN6 - Driving Wheel - $80010.w(0)
  683.     DRIVING_WHEEL
  684.  
  685. INPUT_PORTS_END
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693. /**************************************************************************
  694.                             [ F1 GrandPrix Star ]
  695. **************************************************************************/
  696.  
  697. //    Input Ports:    [0] Fake: Buttons Status
  698. //                    [1] DSW 1 & 2        [2] Controls        [3] Unknown
  699. //                    [4]    DSW 3            [5] Driving Wheel
  700. //                    [6]    Coinage JP&USA    [7] Coinage UK&FR
  701.  
  702. INPUT_PORTS_START( f1gpstar )
  703.  
  704.  
  705.     PORT_START    // IN0 - Fake input port - Buttons status
  706.     BUTTONS_STATUS
  707.  
  708. /*    [Country]
  709.     Japan        "race together" in Test Mode, Always Choose Race
  710.                 Japanese, Km/h, "handle shock"  , "(c)1991",
  711.     USA            English,  Mph , "steering shock", "(c)1992 North America Only"
  712.     England        English,  Mph , "steering shock", "(c)1992"
  713.     France        French,   Km/h, "steering shock", "(c)1992"    */
  714.  
  715.     PORT_START    // IN1 - DSW 1 & 2 - $80000.w    -> !f9012
  716.     // DSW 1 ( Coinage - it changes with Country: we use IN6 & IN7 )
  717.     PORT_DIPNAME( 0x0040, 0x0040, "Free Play (UK FR)" )
  718.     PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  719.     PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  720.     PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )    // unused?
  721.     PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
  722.     PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  723.     // DSW 2
  724.     PORT_DIPNAME( 0x0300, 0x0300, "Country"  )    // -> !f901e
  725.     PORT_DIPSETTING(      0x0300, "Japan"   )
  726.     PORT_DIPSETTING(      0x0200, "USA"     )
  727.     PORT_DIPSETTING(      0x0100, "UK"      )
  728.     PORT_DIPSETTING(      0x0000, "France"  )
  729.     PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) )    // -> !f9026
  730.     PORT_DIPSETTING(      0x0000, "Easy"      )    // 58 <- Initial Time (seconds, Germany)
  731.     PORT_DIPSETTING(      0x0c00, "Normal"    )    // 51
  732.     PORT_DIPSETTING(      0x0800, "Hard"      )    // 48
  733.     PORT_DIPSETTING(      0x0400, "Very Hard" )    // 46
  734.     PORT_BITX(    0x1000, 0x1000, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Infinite Time", IP_KEY_NONE, IP_JOY_NONE )
  735.     PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
  736.     PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  737.     PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )    // ?
  738.     PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
  739.     PORT_DIPSETTING(      0x2000, DEF_STR( On )  )
  740.     PORT_DIPNAME( 0x4000, 0x4000, "Choose Race (US UK FR)"  )    // -> f0020
  741.     PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
  742.     PORT_DIPSETTING(      0x4000, DEF_STR( On )  )
  743.     PORT_DIPNAME( 0x8000, 0x8000, "Vibrations" )
  744.     PORT_DIPSETTING(      0x8000, "High?" )
  745.     PORT_DIPSETTING(      0x0000, "Low?"  )
  746.  
  747.  
  748.     PORT_START    // IN2 - Controls - $80004.w -> !f9016
  749.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_COIN1   )
  750.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_COIN2   )
  751.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_COIN3   )    // operator's facility
  752.     PORT_BITX( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )     // -> f0100 (called "Test")
  753.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_START1  )
  754. //    PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 )    // Shift -> !f900e - We handle it with 2 buttons
  755.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 )    // Brake -> !f9010
  756.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_START2  )    // "Race Together"
  757.  
  758.  
  759.     PORT_START    // IN3 - ? Read at boot only - $80006.w
  760.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
  761.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
  762.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
  763.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
  764.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
  765.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
  766.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  767.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
  768.     PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  769.     PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  770.     PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  771.     PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  772.     PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  773.     PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  774.     PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  775.     PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  776.  
  777. /*    DSW3-2&1 (Country: JP)    Effect
  778.     OFF-OFF                    Red-White Car
  779.     OFF- ON                    Red Car
  780.     ON-OFF                    Blue-White Car
  781.     ON- ON                    Blue Car, "equipped with communication link"    */
  782.  
  783.     PORT_START    // IN4 - DSW 3 (4 bits, Cabinet Linking) - $8000c.w -> !f9014
  784.     PORT_DIPNAME( 0x01, 0x01, "This Unit Is" )
  785.     PORT_DIPSETTING(    0x01, "Slave" )
  786.     PORT_DIPSETTING(    0x00, "Master" )
  787.     PORT_DIPNAME( 0x06, 0x06, "Unit ID" )            // -> !f901c
  788.     PORT_DIPSETTING(    0x06, "0 (Red-White Car)" )
  789.     PORT_DIPSETTING(    0x04, "1 (Red Car)" )
  790.     PORT_DIPSETTING(    0x02, "2 (Blue-White Car)" )
  791.     PORT_DIPSETTING(    0x00, "3 (Blue Car)" )
  792.     PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )    // Redundant: Invert Unit ID
  793.     PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  794.     PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  795.     PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  796.     PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  797.  
  798.  
  799.                 //          Accelerator   - $80010.b ->  !f9004.w
  800.     PORT_START    // IN5 - Driving Wheel - $80011.b ->  !f9008.w
  801.     DRIVING_WHEEL
  802.  
  803.     PORT_START    // IN6 - Coinage Japan & USA (it changes with Country)
  804.     PORT_DIPNAME( 0x0007, 0x0007, "Coin A (JP US)" )
  805.     PORT_DIPSETTING(      0x0001, DEF_STR( 4C_1C ) )
  806.     PORT_DIPSETTING(      0x0002, DEF_STR( 3C_1C ) )
  807.     PORT_DIPSETTING(      0x0003, DEF_STR( 2C_1C ) )
  808.     PORT_DIPSETTING(      0x0007, DEF_STR( 1C_1C ) )
  809.     PORT_DIPSETTING(      0x0006, DEF_STR( 1C_2C ) )
  810.     PORT_DIPSETTING(      0x0005, DEF_STR( 1C_3C ) )
  811.     PORT_DIPSETTING(      0x0004, DEF_STR( 1C_4C ) )
  812.     PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
  813.     PORT_DIPNAME( 0x0038, 0x0038, "Coin B (JP US)" )
  814.     PORT_DIPSETTING(      0x0008, DEF_STR( 4C_1C ) )
  815.     PORT_DIPSETTING(      0x0010, DEF_STR( 3C_1C ) )
  816.     PORT_DIPSETTING(      0x0018, DEF_STR( 2C_1C ) )
  817.     PORT_DIPSETTING(      0x0038, DEF_STR( 1C_1C ) )
  818.     PORT_DIPSETTING(      0x0030, DEF_STR( 1C_2C ) )
  819.     PORT_DIPSETTING(      0x0028, DEF_STR( 1C_3C ) )
  820.     PORT_DIPSETTING(      0x0020, DEF_STR( 1C_4C ) )
  821.  
  822.     PORT_START    // IN7 - Coinage UK & France (it changes with Country)
  823.     PORT_DIPNAME( 0x0007, 0x0007, "Coin A (UK FR)" )
  824.     PORT_DIPSETTING(      0x0007, DEF_STR( 1C_1C ) )
  825.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  826.     PORT_DIPSETTING(      0x0006, DEF_STR( 1C_2C ) )
  827.     PORT_DIPSETTING(      0x0005, DEF_STR( 1C_3C ) )
  828.     PORT_DIPSETTING(      0x0004, DEF_STR( 1C_4C ) )
  829.     PORT_DIPSETTING(      0x0003, DEF_STR( 1C_5C ) )
  830.     PORT_DIPSETTING(      0x0002, DEF_STR( 1C_6C ) )
  831.     PORT_DIPSETTING(      0x0001, DEF_STR( 1C_7C ) )
  832.     PORT_DIPNAME( 0x0038, 0x0038, "Coin B (UK FR)" )
  833.     PORT_DIPSETTING(      0x0000, DEF_STR( 5C_1C ) )
  834.     PORT_DIPSETTING(      0x0008, DEF_STR( 4C_1C ) )
  835.     PORT_DIPSETTING(      0x0010, DEF_STR( 3C_1C ) )
  836.     PORT_DIPSETTING(      0x0018, DEF_STR( 2C_1C ) )
  837.     PORT_DIPSETTING(      0x0038, DEF_STR( 1C_1C ) )
  838.     PORT_DIPSETTING(      0x0030, DEF_STR( 1C_2C ) )
  839.     PORT_DIPSETTING(      0x0028, DEF_STR( 1C_3C ) )
  840.     PORT_DIPSETTING(      0x0020, DEF_STR( 1C_4C ) )
  841.  
  842. INPUT_PORTS_END
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851. /*
  852. **
  853. **             Gfx data
  854. **
  855. */
  856.  
  857. /* Tiles are 8x8 */
  858. MEGASYS1_LAYOUT_8x8(tiles_8x8_01,  0x010000)
  859. MEGASYS1_LAYOUT_8x8(tiles_8x8_02,  0x020000)
  860. MEGASYS1_LAYOUT_8x8(tiles_8x8_04,  0x040000)
  861. MEGASYS1_LAYOUT_8x8(tiles_8x8_08,  0x080000)
  862.  
  863. /* Sprites are 16x16 */
  864. MEGASYS1_LAYOUT_16x16(tiles_16x16_4M,  0x400000)
  865. MEGASYS1_LAYOUT_16x16(tiles_16x16_5M,  0x500000)
  866.  
  867.  
  868. /* Road: 64 x 1 x 4 */
  869. #define ROAD_LAYOUT( _name_, _romsize_ ) \
  870. static struct GfxLayout _name_ = \
  871. { \
  872.     64,1, \
  873.     8*(_romsize_)/(64*1*4), \
  874.     4, \
  875.     {0,1,2,3}, \
  876.     {0*4,1*4,2*4,3*4,4*4,5*4,6*4,7*4, \
  877.      8*4,9*4,10*4,11*4,12*4,13*4,14*4,15*4, \
  878.      16*4,17*4,18*4,19*4,20*4,21*4,22*4,23*4, \
  879.      24*4,25*4,26*4,27*4,28*4,29*4,30*4,31*4, \
  880. \
  881.      32*4,33*4,34*4,35*4,36*4,37*4,38*4,39*4, \
  882.      40*4,41*4,42*4,43*4,44*4,45*4,46*4,47*4, \
  883.      48*4,49*4,50*4,51*4,52*4,53*4,54*4,55*4, \
  884.      56*4,57*4,58*4,59*4,60*4,61*4,62*4,63*4}, \
  885.     {0}, \
  886.     64*1*4 \
  887. };
  888.  
  889. ROAD_LAYOUT( road_layout_1M, 0x100000 )
  890. ROAD_LAYOUT( road_layout_2M, 0x200000 )
  891.  
  892.  
  893. /**************************************************************************
  894.                                 [ Cisco Heat ]
  895. **************************************************************************/
  896.  
  897. static struct GfxDecodeInfo cischeat_gfxdecodeinfo[] =
  898. {
  899.     { REGION_GFX1, 0, &tiles_8x8_04,    32*16*0, 32  }, // [0] Scroll 0
  900.     { REGION_GFX2, 0, &tiles_8x8_04,    32*16*1, 32  }, // [1] Scroll 1
  901.     { REGION_GFX3, 0, &tiles_8x8_01,    32*16*2, 32  }, // [2] Scroll 2
  902.     { REGION_GFX4, 0, &road_layout_1M,    32*16*3, 64  }, // [3] Road 0
  903.     { REGION_GFX4, 0, &road_layout_1M,    32*16*5, 64  }, // [4] Road 1
  904.     { REGION_GFX5, 0, &tiles_16x16_4M,    32*16*7, 128 }, // [5] Sprites
  905.     { -1 }
  906. };
  907.  
  908.  
  909. /**************************************************************************
  910.                             [ F1 GrandPrix Star ]
  911. **************************************************************************/
  912.  
  913. static struct GfxDecodeInfo f1gpstar_gfxdecodeinfo[] =
  914. {
  915.     { REGION_GFX1, 0, &tiles_8x8_08,    0x0000, 16  }, // [0] Scroll 0
  916.     { REGION_GFX2, 0, &tiles_8x8_08,    0x0100, 16  }, // [1] Scroll 1
  917.     { REGION_GFX3, 0, &tiles_8x8_02,    0x0200, 16  }, // [2] Scroll 2
  918.     { REGION_GFX4, 0, &road_layout_2M,    0x0300, 64  }, // [3] Road 0
  919.     { REGION_GFX5, 0, &road_layout_1M,    0x0700, 64  }, // [4] Road 1
  920.     { REGION_GFX6, 0, &tiles_16x16_5M,    0x0b00, 128 }, // [5] Sprites
  921.     { -1 }
  922. };
  923.  
  924.  
  925.  
  926.  
  927. /* CPU # 1 */
  928. #define CISCHEAT_INTERRUPT_NUM    3
  929.  
  930. int cischeat_interrupt(void)
  931. {
  932.     if (cpu_getiloops()==0)    return 4; /* Once */
  933.     else
  934.     {
  935.         if (cpu_getiloops()%2)    return 2;
  936.         else                     return 1;
  937.     }
  938. }
  939.  
  940.  
  941.  
  942.  
  943. /* CPU # 2 & 3 */
  944. #define CISCHEAT_SUB_INTERRUPT_NUM    1
  945. int cischeat_sub_interrupt(void)
  946. {
  947.     return 4;
  948. }
  949.  
  950.  
  951.  
  952. /* CPU # 4 */
  953. #define CISCHEAT_SOUND_INTERRUPT_NUM    16
  954. int cischeat_sound_interrupt(void)
  955. {
  956.     return 4;
  957. }
  958.  
  959. #define STD_FM_CLOCK    3000000
  960. #define STD_OKI_CLOCK      12000
  961.  
  962.  
  963. #define GAME_DRIVER(_shortname_, \
  964.                     _cpu_1_clock_,_cpu_2_clock_,_cpu_3_clock_,_cpu_4_clock_, \
  965.                     _fm_clock_,_oki1_clock_,_oki2_clock_, \
  966.                     _visible_area_, _colors_num_ ) \
  967. \
  968. static struct YM2151interface _shortname_##_ym2151_interface = \
  969. { \
  970.     1, \
  971.     _fm_clock_, \
  972.     { YM3012_VOL(33,MIXER_PAN_LEFT,33,MIXER_PAN_RIGHT) }, \
  973.     { 0 } \
  974. }; \
  975. \
  976. static struct OKIM6295interface _shortname_##_okim6295_interface = \
  977. { \
  978.     2, \
  979.     {_oki1_clock_, _oki2_clock_},\
  980.     {REGION_SOUND1,REGION_SOUND2}, \
  981.     { 33, 33 } \
  982. }; \
  983. \
  984. static struct MachineDriver machine_driver_##_shortname_ = \
  985. { \
  986.     { \
  987.         { \
  988.             CPU_M68000, \
  989.             _cpu_1_clock_, \
  990.             _shortname_##_readmem,_shortname_##_writemem,0,0, \
  991.             cischeat_interrupt, CISCHEAT_INTERRUPT_NUM \
  992.         }, \
  993.         { \
  994.             CPU_M68000, \
  995.             _cpu_2_clock_, \
  996.             _shortname_##_readmem2,_shortname_##_writemem2,0,0, \
  997.             cischeat_sub_interrupt, CISCHEAT_SUB_INTERRUPT_NUM \
  998.         }, \
  999.         { \
  1000.             CPU_M68000, \
  1001.             _cpu_3_clock_, \
  1002.             _shortname_##_readmem3,_shortname_##_writemem3,0,0, \
  1003.             cischeat_sub_interrupt, CISCHEAT_SUB_INTERRUPT_NUM \
  1004.         }, \
  1005.         { \
  1006.             CPU_M68000 | CPU_AUDIO_CPU, \
  1007.             _cpu_4_clock_, \
  1008.             _shortname_##_sound_readmem,_shortname_##_sound_writemem,0,0, \
  1009.             cischeat_sound_interrupt, CISCHEAT_SOUND_INTERRUPT_NUM \
  1010.         }, \
  1011.     }, \
  1012.     60,DEFAULT_REAL_60HZ_VBLANK_DURATION, \
  1013.     100, \
  1014.     0, /* Init Machine */ \
  1015. \
  1016.     /* video hardware */ \
  1017.     256, 256,_visible_area_, \
  1018. \
  1019.     _shortname_##_gfxdecodeinfo, \
  1020.     _colors_num_,_colors_num_, \
  1021.     0, \
  1022. \
  1023.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_AFTER_VBLANK, \
  1024.     0, \
  1025.     _shortname_##_vh_start, \
  1026.     0, \
  1027.     _shortname_##_vh_screenrefresh, \
  1028. \
  1029.     /* sound hardware */ \
  1030.     0,0,0,0, \
  1031.     { \
  1032.         { \
  1033.             SOUND_YM2151, \
  1034.             &_shortname_##_ym2151_interface \
  1035.         },\
  1036.         {\
  1037.             SOUND_OKIM6295, \
  1038.             &_shortname_##_okim6295_interface \
  1039.         } \
  1040.     } \
  1041. };
  1042.  
  1043.  
  1044. /***************************************************************************
  1045.  
  1046.   Game driver(s)
  1047.  
  1048. **************************************************************************/
  1049.  
  1050. /*
  1051.     Sprite data is stored like this:
  1052.  
  1053.     Sprite 0
  1054.         Line 0-15 (left half)
  1055.         Line 0-15 (right half)
  1056.     Sprite 1
  1057.     ..
  1058.  
  1059.     We need to untangle it
  1060. */
  1061. void cischeat_untangle_sprites(int region)
  1062. {
  1063.     unsigned char        *src = memory_region(region);
  1064.     const unsigned char    *end = memory_region(region) + memory_region_length(region);
  1065.  
  1066.     while (src < end)
  1067.     {
  1068.         unsigned char sprite[16*8];
  1069.         int i;
  1070.  
  1071.         for (i = 0; i < 16 ; i++)
  1072.         {
  1073.             memcpy(&sprite[i*8+0], &src[i*4+0],    4);
  1074.             memcpy(&sprite[i*8+4], &src[i*4+16*4], 4);
  1075.         }
  1076.         memcpy(src, sprite, 16*8);
  1077.         src += 16*8;
  1078.     }
  1079. }
  1080.  
  1081.  
  1082.  
  1083. /***************************************************************************
  1084.  
  1085.                                 [ Cisco Heat ]
  1086.  
  1087. From "ARCADE ROMS FROM JAPAN (ARFJ)"'s readme:
  1088.  
  1089.  -BOARD #1 CH-9072 EB90001-20024-
  1090. |                [9]r15 [10]r16  |    EP:    [1]ch9072.01    [2]ch9072.02
  1091. |               [11]r17 [12]r18  |        [3]ch9072.03
  1092. |               [13]r25 [14]r26  |MASK:    [9]ch9072.r15    [10]ch9072.r16
  1093. |               [15]r19 [16]r20  |        [11]ch9072.r17    [12]ch9072.r18
  1094. |     [1]01                      |        [13]ch9072.r25    [14]ch9072.r26
  1095. |[2]02[3]03                      |        [15]ch9072.r19    [16]ch9072.r20
  1096. |[4] [5] [6]                     |
  1097. |[7]                             |    ([4][5][6][8]:27cx322  [7]:82S135)
  1098. |[8]                             |
  1099.  --------------------------------
  1100.  
  1101. Video                        Sound
  1102.  -BOARD #2 CH-9071 EB90001-20023-     X1:12Mhz  X2:4Mhz  X3:20Mhz  X4:7Mhz
  1103. |68000             [9]      68000|    YM2151x1 OKI M6295 x2 ([8]82S147 [9]:82S185)
  1104. |[1]01 X3               X4 [11]11|    EP:    [1]ch9071v2.01 "CH-9071 Ver.2  1"
  1105. |[2]02                     [10]10|        [2]ch9071.02
  1106. |[3]03                           |        [3]ch9071v2.03 "CH-9071 Ver.2  3"
  1107. |[4]04            X1 X2   [12]r23|        [4]ch9071.04
  1108. |           [8]     YM2151[13]r24|        [7]ch9071.07
  1109. |[7]07[5]a14[6]t74               |        [10]ch9071.10     [11]ch9071.11
  1110. |                                |MASK:    [5]ch9071.a14    [6]ch9071.t74
  1111.  --------------------------------        [12]ch9071.r23    [13]ch9071.r24
  1112.  
  1113.  -BOARD #3 CH-9073 EB90001-20025-
  1114. |           [5]r21 [6]r22   68000|
  1115. |    [9]    [1]01  [2]02         | EP:    [1]ch9073.01    [2]ch9073.02
  1116. |                                |        [3]ch9073v1.03 "CH-9073 Ver.1  3"
  1117. |           [7]r21 [8]r22   68000|        [4]ch9073v1.04 "CH-9073 Ver.1  4"
  1118. |           [3]03  [4]04         |MASK:    [5][7]ch9073.r21
  1119. |            [10]    [11]        |        [6][8]ch9073.r22
  1120. |                                |        ([9][10][11]:82S129)
  1121.  --------------------------------
  1122.  
  1123. DIP SW:8BITx2 , 4BITx1
  1124.  
  1125. According to KLOV:
  1126.  
  1127. Controls:    Steering: Wheel - A 'judder' motor is attached to the wheel.
  1128.             Pedals: 2 - Both foot controls are simple switches.
  1129. Sound:        Amplified Stereo (two channel)
  1130.  
  1131.  
  1132. ***************************************************************************/
  1133.  
  1134. ROM_START( cischeat )
  1135.     ROM_REGION( 0x080000, REGION_CPU1 )
  1136.     ROM_LOAD_EVEN( "ch9071v2.03", 0x000000, 0x040000, 0xdd1bb26f )
  1137.     ROM_LOAD_ODD(  "ch9071v2.01", 0x000000, 0x040000, 0x7b65276a )
  1138.  
  1139.     ROM_REGION( 0x80000, REGION_CPU2 )
  1140.     ROM_LOAD_EVEN( "ch9073.01",  0x000000, 0x040000, 0xba331526 )
  1141.     ROM_LOAD_ODD(  "ch9073.02",  0x000000, 0x040000, 0xb45ff10f )
  1142.  
  1143.     ROM_REGION( 0x80000, REGION_CPU3 )
  1144.     ROM_LOAD_EVEN( "ch9073v1.03", 0x000000, 0x040000, 0xbf1d1cbf )
  1145.     ROM_LOAD_ODD(  "ch9073v1.04", 0x000000, 0x040000, 0x1ec8a597 )
  1146.  
  1147.     ROM_REGION( 0x40000, REGION_CPU4 )
  1148.     ROM_LOAD_EVEN( "ch9071.11", 0x000000, 0x020000, 0xbc137bea )
  1149.     ROM_LOAD_ODD(  "ch9071.10", 0x000000, 0x020000, 0xbf7b634d )
  1150.  
  1151.     ROM_REGION( 0x100000, REGION_USER1 )    /* second halves of program ROMs */
  1152.     ROM_LOAD_EVEN( "ch9071.04",   0x000000, 0x040000, 0x7fb48cbc )    // cpu #1
  1153.     ROM_LOAD_ODD(  "ch9071.02",   0x000000, 0x040000, 0xa5d0f4dc )
  1154.     // cpu #2 (0x40000 bytes will be copied here)
  1155.     // cpu #3 (0x40000 bytes will be copied here)
  1156.  
  1157.     ROM_REGION( 0x040000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1158.     ROM_LOAD( "ch9071.a14",  0x000000, 0x040000, 0x7a6d147f ) // scroll 0
  1159.  
  1160.     ROM_REGION( 0x040000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1161.     ROM_LOAD( "ch9071.t74",  0x000000, 0x040000, 0x735a2e25 ) // scroll 1
  1162.  
  1163.     ROM_REGION( 0x010000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1164.     ROM_LOAD( "ch9071.07",   0x000000, 0x010000, 0x3724ccc3 ) // scroll 2
  1165.  
  1166.     ROM_REGION( 0x100000, REGION_GFX4 | REGIONFLAG_DISPOSE )
  1167.     ROM_LOAD( "ch9073.r21",  0x000000, 0x080000, 0x2943d2f6 ) // Road
  1168.     ROM_LOAD( "ch9073.r22",  0x080000, 0x080000, 0x2dd44f85 )
  1169.  
  1170.     ROM_REGION( 0x400000, REGION_GFX5 | REGIONFLAG_DISPOSE )    /* sprites */
  1171.     ROM_LOAD_GFX_EVEN( "ch9072.r15",  0x000000, 0x080000, 0x38af4aea )
  1172.     ROM_LOAD_GFX_ODD(  "ch9072.r16",  0x000000, 0x080000, 0x71388dad )
  1173.     ROM_LOAD_GFX_EVEN( "ch9072.r17",  0x100000, 0x080000, 0x9d052cf3 )
  1174.     ROM_LOAD_GFX_ODD(  "ch9072.r18",  0x100000, 0x080000, 0xfe402a56 )
  1175.     ROM_LOAD_GFX_EVEN( "ch9072.r25",  0x200000, 0x080000, 0xbe8cca47 )
  1176.     ROM_LOAD_GFX_ODD(  "ch9072.r26",  0x200000, 0x080000, 0x2f96f47b )
  1177.     ROM_LOAD_GFX_EVEN( "ch9072.r19",  0x300000, 0x080000, 0x4e996fa8 )
  1178.     ROM_LOAD_GFX_ODD(  "ch9072.r20",  0x300000, 0x080000, 0xfa70b92d )
  1179.  
  1180.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* samples */
  1181.     ROM_LOAD( "ch9071.r23", 0x000000, 0x080000, 0xc7dbb992 ) // 2 x 0x40000
  1182.  
  1183.     ROM_REGION( 0x80000, REGION_SOUND2 )    /* samples */
  1184.     ROM_LOAD( "ch9071.r24", 0x000000, 0x080000, BADCRC(0xe87ca4d7) ) // 2 x 0x40000 (FIRST AND SECOND HALF IDENTICAL)
  1185.  
  1186.     /* Unused ROMs */
  1187. //    ROM_LOAD( "ch9072.01",  0x000000, 0x080000, 0xb2efed33 ) // FIXED BITS (xxxxxxxx0xxxxxxx)
  1188. //    ROM_LOAD( "ch9072.02",  0x000000, 0x080000, 0x536edde4 )
  1189. //    ROM_LOAD( "ch9072.03",  0x000000, 0x080000, 0x7e79151a )
  1190. ROM_END
  1191.  
  1192.  
  1193.  
  1194. void init_cischeat(void)
  1195. {
  1196. /* Split ROMs */
  1197.     rom_1 = memory_region(REGION_USER1) + 0x00000;
  1198.  
  1199.     rom_2 = memory_region(REGION_CPU2) + 0x40000;
  1200.     memcpy(memory_region(REGION_USER1) + 0x80000, rom_2, 0x40000);
  1201.     memset(rom_2, 0, 0x40000);
  1202.     rom_2 = memory_region(REGION_USER1) + 0x80000;
  1203.  
  1204.     rom_3 = memory_region(REGION_CPU3) + 0x40000;
  1205.     memcpy(memory_region(REGION_USER1) + 0xc0000, rom_3, 0x40000);
  1206.     memset(rom_3, 0, 0x40000);
  1207.     rom_3 = memory_region(REGION_USER1) + 0xc0000;
  1208.  
  1209.     cischeat_untangle_sprites(REGION_GFX5);    // Untangle sprites
  1210.     astyanax_rom_decode(3);                    // Decrypt sound cpu code
  1211. }
  1212.  
  1213.  
  1214. #define CISCHEAT_VISIBLE_AREA    {0,255,16,231}
  1215.  
  1216. GAME_DRIVER(    cischeat,
  1217.                 10000000,10000000,10000000,7000000,
  1218.                 STD_FM_CLOCK,STD_OKI_CLOCK,STD_OKI_CLOCK,
  1219.                 CISCHEAT_VISIBLE_AREA,
  1220.                 32*16 * 3 + 64*16 * 2 + 128*16)    /* scroll 0,1,2; road 0,1; sprites */
  1221.  
  1222.  
  1223.  
  1224. /***************************************************************************
  1225.  
  1226.                             [ F1 GrandPrix Star ]
  1227.  
  1228. From malcor's readme:
  1229.  
  1230. Location     Device      File ID     Checksum      PROM Label
  1231. -----------------------------------------------------------------
  1232. LB IC2       27C010    9188A-1.V10     46C6     GP-9188A 1  Ver1.0
  1233. LB IC27      27C010    9188A-6.V10     DB84     GP-9188A 6  Ver1.0
  1234. LB IC46      27C010    9188A-11.V10    DFEA     GP-9188A 11 Ver1.0
  1235. LB IC70      27C010    9188A-16.V10    1034     GP-9188A 16 Ver1.0
  1236. LB IC91      27C020    9188A-21.V10    B510     GP-9188A 21 Ver1.0
  1237. LB IC92      27C020    9188A-22.V20    A9BA     GP-9188A 22 Ver2.0
  1238. LB IC124     27C020    9188A-26.V10    AA81     GP-9188A 26 Ver1.0
  1239. LB IC125     27C020    9188A-27.V20    F34D     GP-9188A 27 Ver2.0
  1240. LB IC174    23C1000    9188A-30.V10    0AA5     GP-9188A 30 Ver1.0
  1241. TB IC2       27C010    9190A-1.V11     B05A     GP-9190A 1  Ver1.1
  1242. TB IC4       27C010    9190A-2.V11     ED7A     GP-9190A 2  Ver1.1
  1243. LB IC37     23C4001    90015-01.W06    F10F     MR90015-01-W06      *
  1244. LB IC79     23C4001    90015-01.W06    F10F     MR90015-01-W06      *
  1245. LB IC38     23C4001    90015-02.W07    F901     MR90015-02-W07      *
  1246. LB IC80     23C4001    90015-02.W07    F901     MR90015-02-W07      *
  1247. LB IC39     23C4001    90015-03.W08    F100     MR90015-03-W08      *
  1248. LB IC81     23C4001    90015-03.W08    F100     MR90015-03-W08      *
  1249. LB IC40     23C4001    90015-04.W09    FA00     MR90015-04-W09      *
  1250. LB IC82     23C4001    90015-04.W09    FA00     MR90015-04-W09      *
  1251. LB IC64     23C4001    90015-05.W10    5FF9     MR90015-05-W10
  1252. LB IC63     23C4001    90015-06.W11    6EDA     MR90015-06-W11
  1253. LB IC62     23C4001    90015-07.W12    E9B4     MR90015-07-W12
  1254. LB IC61     23C4001    90015-08.W14    5107     MR90015-08-W14
  1255. LB IC17     23C4001    90015-09.W13    71EE     MR90015-09-W13
  1256. LB IC16     23C4001    90015-10.W15    EFEF     MR90015-10-W15
  1257. MB IC54     23C4001    90015-20.R45    7890     MR90015-20-R45      *
  1258. MB IC67     23C4001    90015-20.R45    7890     MR90015-20-R45      *
  1259. MB IC1      23C4001    90015-21.R46    C73C     MR90015-21-R46
  1260. MB IC2      23C4001    90015-22.R47    5D58     MR90015-22-R47
  1261. MB IC5      23C4001    90015-23.R48    4E7B     MR90015-23-R48
  1262. MB IC6      23C4001    90015-24.R49    F6A0     MR90015-24-R49
  1263. MB IC11     23C4001    90015-25.R50    9FC0     MR90015-25-R50
  1264. MB IC12     23C4001    90015-26.R51    13E4     MR90015-26-R51
  1265. MB IC15     23C4001    90015-27.R52    8D5D     MR90015-27-R52
  1266. MB IC16     23C4001    90015-28.R53    E0B8     MR90015-28-R53
  1267. MB IC21     23C4001    90015-29.R54    DF33     MR90015-29-R54
  1268. MB IC22     23C4001    90015-30.R55    DA2D     MR90015-30-R55
  1269. LB IC123    23C4001    90015-31.R56    BE57     MR90015-31-R56
  1270. LB IC152    23C4001    90015-32.R57    8B57     MR90015-32-R57
  1271. TB IC12     23C4001    90015-33.W31    7C0E     MR90015-33-W31
  1272. TB IC11     23C4001    90015-34.W32    B203     MR90015-34-W32
  1273. MB IC39     27CX322    CH9072-4        085F     CH9072 4
  1274. MB IC33     27CX322    CH9072-5        641D     CH9072 5
  1275. MB IC35     27CX322    CH9072-6        EAE1     CH9072 6
  1276. MB IC59     27CX322    CH9072-8        AB60     CH9072 8
  1277. LB IC105    N82S147    PR88004Q        FCFC     PR88004Q
  1278. LB IC66     N82S135    PR88004W        20C8     PR88004W
  1279. LB IC117    N82S185    PR90015A        3326     PR90015A
  1280. LB IC153    N82S135    PR90015B        1E52     PR90015B
  1281.  
  1282. Notes:  TB - Top board     (audio & I/O)       GP-9190A EB90015-20039-1
  1283.         MB - Middle board  (GFX)               GP-9189  EB90015-20038
  1284.         LB - Lower board   (CPU/GFX)           GP-9188A EB90015-20037-1
  1285.  
  1286.          * - These ROMs are found twice on the PCB
  1287.            - There are two linked boards per cabinet (two player cabinet)
  1288.              (attract mode displays across both monitors)
  1289.  
  1290. Brief hardware overview:
  1291. ------------------------
  1292.  
  1293. Main processor   - 68000
  1294.                  - program ROMs: 9188A-22.V20 (odd), 9188A-27.V20 (even) bank 1
  1295.                                  9188A-21.V10 (odd), 9188A-26.V10 (even) bank 2
  1296.                  - Processor RAM 2x LH52250AD-90L (32kx8 SRAM)
  1297.  
  1298. Slave processor1 - 68000
  1299.                  - program ROMs: 9188A-11.V10 (odd), 9188A-16.V10 (even)
  1300.                  - Processor RAM 2x LH5168D-10L (8kx8 SRAM)
  1301.                  - CS90015-04 (64 pin PQFP)  + 2x MCM2018AN45 (2kx8 SRAM)
  1302.                  - GS90015-05 (100 pin PQFP) + 2x MCM2018AN45 (2kx8 SRAM)
  1303.                  - uses ROMs: 90015-08.W14, 90015-07.W12, 90015-06.W11
  1304.                               90015-05.W10, 90015-01.W06, 90015-02.W07
  1305.                               90015-03.W08, 90015-04.W09
  1306.  
  1307. Slave processor2 - 68000
  1308.                  - Program ROMs: 9188A-1.V10 (odd), 9188A-6.V10 (even)
  1309.                  - Processor RAM 2x LH5168D-10L (8kx8 SRAM)
  1310.                  - CS90015-04 (64 pin PQFP)  + 2x MCM2018AN45 (2kx8 SRAM)
  1311.                  - GS90015-05 (100 pin PQFP) + 2x MCM2018AN45 (2kx8 SRAM)
  1312.                  - uses ROMs: 90015-01.W06, 90015-02.W07, 90015-03.W08
  1313.                               90015-10.W15, 90015-09.W13, 90015-04.W09
  1314.  
  1315. Sound processor  - 68000
  1316.                  - Program ROMs: 9190A-1.V11 (odd), 9190A-2.V11 (even)
  1317.                  - Processor RAM 2x LH52250AD-90L (32kx8 SRAM)
  1318.                  - M6295,  uses ROM  90015-34.W32
  1319.                  - M6295,  uses ROM  90015-33.W31
  1320.                  - YM2151
  1321.  
  1322. GFX & Misc       - GS90015-02 (100 pin PQFP),  uses ROM 90015-31-R56
  1323.                    GS-9000406 (80 pin PQFP)  + 2x LH5168D-10L (8kx8 SRAM)
  1324.  
  1325.                  - GS90015-02 (100 pin PQFP),  uses ROM 90015-32-R57
  1326.                    GS-9000406 (80 pin PQFP)  + 2x LH5168D-10L (8kx8 SRAM)
  1327.  
  1328.                  - GS90015-02 (100 pin PQFP),  uses ROM 9188A-30-V10
  1329.                    GS-9000406 (80 pin PQFP)  + 2x LH5168D-10L (8kx8 SRAM)
  1330.  
  1331.                  - GS900151   (44 pin PQFP) (too small for the full part No.)
  1332.              3x  - GS90015-03 (80 pin PQFP)  + 2x LH52258D-45 (32kx8 SRAM)
  1333.              2x  - GS90015-06 (100 pin PQFP) + 2x LH52250AD-90L (32kx8 SRAM)
  1334.                  - GS90015-07 (64 pin PQFP)
  1335.                  - GS90015-08 (64 pin PQFP)
  1336.                  - GS90015-09 (64 pin PQFP)  + 2x MCM2018AN45 (2kx8 SRAM)
  1337.                  - GS90015-10 (64 pin PQFP)
  1338.                  - GS90015-12 (80 pin PQFP)  + 2x MCM2018AN45 (2kx8 SRAM)
  1339.                  - GS90015-11 (100 pin PQFP)
  1340.                    uses ROMs 90015-30-R55, 90015-25-R50, 90015-24-R49
  1341.                              90015-29-R54, 90015-23-R48, 90015-22-R47
  1342.                              90015-28-R53, 90015-21-R46, 90015-27-R52
  1343.                              90015-26-R51
  1344.  
  1345.  
  1346. ***************************************************************************/
  1347.  
  1348. ROM_START( f1gpstar )
  1349.     ROM_REGION( 0x100000, REGION_CPU1 )
  1350.     ROM_LOAD_EVEN( "9188a-27.v20", 0x000000, 0x040000, 0x0a9d3896 )
  1351.     ROM_LOAD_ODD(  "9188a-22.v20", 0x000000, 0x040000, 0xde15c9ca )
  1352.  
  1353.     ROM_REGION( 0x80000, REGION_CPU2 )
  1354.     /* Should Use ROMs:    90015-01.W06, 90015-02.W07, 90015-03.W08, 90015-04.W09 */
  1355.     ROM_LOAD_EVEN( "9188a-16.v10",  0x000000, 0x020000, 0xef0f7ca9 )
  1356.     ROM_LOAD_ODD(  "9188a-11.v10",  0x000000, 0x020000, 0xde292ea3 )
  1357.  
  1358.     ROM_REGION( 0x80000, REGION_CPU3 )
  1359.     /* Should Use ROMs:    90015-01.W06, 90015-02.W07, 90015-03.W08, 90015-04.W09 */
  1360.     ROM_LOAD_EVEN( "9188a-6.v10",  0x000000, 0x020000, 0x18ba0340 )
  1361.     ROM_LOAD_ODD(  "9188a-1.v10",  0x000000, 0x020000, 0x109d2913 )
  1362.  
  1363.     ROM_REGION( 0x40000, REGION_CPU4 )
  1364.     ROM_LOAD_EVEN( "9190a-2.v11", 0x000000, 0x020000, 0xacb2fd80 )
  1365.     ROM_LOAD_ODD(  "9190a-1.v11", 0x000000, 0x020000, 0x7cccadaf )
  1366.  
  1367.     ROM_REGION( 0x80000, REGION_USER1 )    /* second halves of program ROMs */
  1368.     ROM_LOAD_EVEN( "9188a-26.v10", 0x000000, 0x040000, 0x0b76673f )    // cpu #1
  1369.     ROM_LOAD_ODD(  "9188a-21.v10", 0x000000, 0x040000, 0x3e098d77 )
  1370.  
  1371.     ROM_REGION( 0x080000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1372.     ROM_LOAD( "90015-31.r56",  0x000000, 0x080000, 0x0c8f0e2b ) // scroll 0
  1373.  
  1374.     ROM_REGION( 0x080000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1375.     ROM_LOAD( "90015-32.r57",  0x000000, 0x080000, 0x9c921cfb ) // scroll 1
  1376.  
  1377.     ROM_REGION( 0x020000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1378.     ROM_LOAD( "9188a-30.v10",  0x000000, 0x020000, 0x0ef1fbf1 ) // scroll 2
  1379.  
  1380.     ROM_REGION( 0x200000, REGION_GFX4 | REGIONFLAG_DISPOSE )
  1381.     ROM_LOAD( "90015-05.w10",  0x000000, 0x080000, 0x8eb48a23 ) // Road 0
  1382.     ROM_LOAD( "90015-06.w11",  0x080000, 0x080000, 0x32063a68 )
  1383.     ROM_LOAD( "90015-07.w12",  0x100000, 0x080000, 0x0d0d54f3 )
  1384.     ROM_LOAD( "90015-08.w14",  0x180000, 0x080000, 0xf48a42c5 )
  1385.  
  1386.     ROM_REGION( 0x100000, REGION_GFX5 | REGIONFLAG_DISPOSE )
  1387.     ROM_LOAD( "90015-09.w13",  0x000000, 0x080000, 0x55f49315 ) // Road 1
  1388.     ROM_LOAD( "90015-10.w15",  0x080000, 0x080000, 0x678be0cb )
  1389.  
  1390.     ROM_REGION( 0x500000, REGION_GFX6 | REGIONFLAG_DISPOSE )    /* sprites */
  1391.     ROM_LOAD_GFX_EVEN( "90015-21.r46",  0x000000, 0x080000, 0x6f30211f )
  1392.     ROM_LOAD_GFX_ODD(  "90015-22.r47",  0x000000, 0x080000, 0x05a9a5da )
  1393.     ROM_LOAD_GFX_EVEN( "90015-23.r48",  0x100000, 0x080000, 0x58e9c6d2 )
  1394.     ROM_LOAD_GFX_ODD(  "90015-24.r49",  0x100000, 0x080000, 0xabd6c91d )
  1395.     ROM_LOAD_GFX_EVEN( "90015-25.r50",  0x200000, 0x080000, 0x7ded911f )
  1396.     ROM_LOAD_GFX_ODD(  "90015-26.r51",  0x200000, 0x080000, 0x18a6c663 )
  1397.     ROM_LOAD_GFX_EVEN( "90015-27.r52",  0x300000, 0x080000, 0x7378c82f )
  1398.     ROM_LOAD_GFX_ODD(  "90015-28.r53",  0x300000, 0x080000, 0x9944dacd )
  1399.     ROM_LOAD_GFX_EVEN( "90015-29.r54",  0x400000, 0x080000, 0x2cdec370 )
  1400.     ROM_LOAD_GFX_ODD(  "90015-30.r55",  0x400000, 0x080000, 0x47e37604 )
  1401.  
  1402.     ROM_REGION( 0x80000, REGION_SOUND1 )    /* samples */
  1403.     ROM_LOAD( "90015-34.w32", 0x000000, 0x080000, 0x2ca9b062 ) // 2 x 0x40000
  1404.  
  1405.     ROM_REGION( 0x80000, REGION_SOUND2 )    /* samples */
  1406.     ROM_LOAD( "90015-33.w31", 0x000000, 0x080000, 0x6121d247 ) // 2 x 0x40000
  1407.  
  1408.     /* Unused ROMs */
  1409.  
  1410. // "I know that one of the ROM images in the archive looks bad (90015-04.W09)
  1411. //  however, it is good as far as I can tell. There were two of those ROMs
  1412. // (soldered) onto the board and I checked them both against each other. "
  1413.  
  1414. //    ROM_LOAD( "90015-04.w09",  0x000000, 0x080000, 0x5b324c81 )    // x 2 xxxxxxxxx0xxxxxxxxx = 0x00
  1415. //    ROM_LOAD( "90015-03.w08",  0x000000, 0x080000, 0xccf5b158 )    // x 2 FIXED BITS (000x000x)
  1416. //    ROM_LOAD( "90015-02.w07",  0x000000, 0x080000, 0xfcbecc9b )    // x 2
  1417. //    ROM_LOAD( "90015-01.w06",  0x000000, 0x080000, 0xce4bfe6e )    // x 2 FIXED BITS (000x000x)
  1418.  
  1419. //    ROM_LOAD( "90015-20.r44",  0x000000, 0x080000, 0x9d428fb7 ) // x 2
  1420.  
  1421. //    ROM_LOAD( "ch9072-4",  0x000000, 0x001000, 0x5bc23535 )    // FIXED BITS (0000000x)
  1422. //    ROM_LOAD( "ch9072-5",  0x000000, 0x001000, 0x0efac5b4 )    // FIXED BITS (xxxx0xxx)
  1423. //    ROM_LOAD( "ch9072-6",  0x000000, 0x001000, 0x76ff63c5 )
  1424. //    ROM_LOAD( "ch9072-8",  0x000000, 0x001000, 0xca04bace )    // FIXED BITS (0xxx0xxx)
  1425.  
  1426. //    ROM_LOAD( "pr88004q",  0x000000, 0x000200, 0x9327dc37 )    // FIXED BITS (1xxxxxxx1111x1xx)
  1427. //    ROM_LOAD( "pr88004w",  0x000000, 0x000100, 0x3d648467 )    // FIXED BITS (00xxxxxx)
  1428.  
  1429. //    ROM_LOAD( "pr90015a",  0x000000, 0x000800, 0x777583db )    // FIXED BITS (00000xxx0000xxxx)
  1430. //    ROM_LOAD( "pr90015b",  0x000000, 0x000100, 0xbe240dac )    // FIXED BITS (000xxxxx000xxxx1)
  1431. ROM_END
  1432.  
  1433.  
  1434.  
  1435. void init_f1gpstar(void)
  1436. {
  1437. /* Split ROMs */
  1438.     rom_1 = memory_region(REGION_USER1) + 0x00000;
  1439.  
  1440.     cischeat_untangle_sprites(REGION_GFX6);
  1441. }
  1442.  
  1443.  
  1444.  
  1445. #define F1GPSTAR_VISIBLE_AREA    {0,255,16,239}
  1446.  
  1447. // The date is 1992 whenever the country (DSW) isn't set to Japan
  1448. GAME_DRIVER(    f1gpstar,
  1449.                 12000000,12000000,12000000,7000000,
  1450.                 STD_FM_CLOCK,STD_OKI_CLOCK,STD_OKI_CLOCK,
  1451.                 F1GPSTAR_VISIBLE_AREA,
  1452.                 16*16 * 3 + 64*16 * 2 + 128*16)    /* scroll 0,1,2; road 0,1; sprites */
  1453.  
  1454.  
  1455.  
  1456. GAME( 1990, cischeat, 0, cischeat, cischeat, cischeat, ROT0_16BIT, "Jaleco", "Cisco Heat" )
  1457. GAME( 1991, f1gpstar, 0, f1gpstar, f1gpstar, f1gpstar, ROT0_16BIT, "Jaleco", "F1 Grand Prix Star" )
  1458.